CC=gcc
CFLAG=-Wall -O2 -g
OBJECT=serial_read.o serial_write.o

all:serial_read.out serial_write.out

serial_read.out:serial_read.o
	$(CC) $(CFLAG) $< -o $@

serial_write.out:serial_write.o
	$(CC) $(CFLAG) $< -o $@

%*.o:%*.c
	$(CC) $(CFLAG) -c $< -o $@

.PHONY:clean
clean:
	rm -rf *.out $(OBJECT)


